# -*- coding:utf-8 -*-  
#######################################################
#                                   
# 数据库相关
# 引入数据库部分，将搜索过的结果保存在数据库中
#
#######################################################

import io
import sqlite3

conn=sqlite3.connect('example.db')

c=conn.cursor()

c.execute('''CREATE TABLE stocks(data text,trans text,symbol text,qty real,price real)''')

c.excute("INSERT INTO stocks VALUES ('2001-01-05','BUY','RHAT',100,35.14)")

conn.commit()

conn.close()

class DBComic(object):
    def __init__(self,id=None,url=None,title=None,cover_id=None,description=None,status=None):
        self.id=id
        self.url=url
        self.title=title
        self.status=status
        self.cover_id=cover_id
        self.description=description

class DBVol(object):
    def __init__(self,id=None,comic_id=None,url=None,title=None):
        self.id=id
        self.comic_id=comic_id
        self.url=url
        self.title=title

class DBPicture(object):
    def __init__(self,id=None,vol_id=None,url=None,title=None):
        self.id=id
        self.vol_id=id
        self.url=url
        self.title=title